#include <iostream>
#include <fstream>
#include <math.h>
int main()
{
    std::ifstream inst;
    inst.open("CoreNatureDictionary.mini.txt");
    std::string str;
    std::string maxlenstring;
    int maxlen  = 0;
    while (!inst.eof())
    {
      inst>>str;
      if(maxlen<str.size())
      {
          maxlenstring = str;
          maxlen = str.size();
      }
      inst>>str>>str;
    }
    std::cout<<"最长的词为："<<maxlenstring<<" 长度为："<<maxlen<<std::endl;
    

 return 0;   
}